package Task9;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        System.out.println(addAB(a,b));
    }
    public static int addAB(int A, int B) {
       int sum;
        while (true) {
            sum = A ^ B;
            int flag = (A & B) << 1;
            if (flag == 0) {
                break;
            }
            A = sum;
            B = flag;
        }
        return sum;


    }
}
